﻿resources = {
	/// <summary>
    /// 银行卡类型
    /// </summary>
    BankCardType : 
    {
        /// <summary>
        /// 信用卡
        /// </summary>
        CreditCard:0,

        /// <summary>
        /// 储蓄卡
        /// </summary>
        DepositCard:1
    },
    
    BankCardTypeText : 
    {
        /// <summary>
        /// 信用卡
        /// </summary>
        CreditCard:'信用卡',

        /// <summary>
        /// 储蓄卡
        /// </summary>
        DepositCard:'储蓄卡'
    },
    
    GetBankCardTypeByValue:function(value){
    	return this.BankCardTypeText[getKeyByValue(this.BankCardType, value)];
    },
    
    PayType:{
    	/// <summary>
        /// 余额
        /// </summary>
        Balance:3,
        /// <summary>
        /// 银行卡
        /// </summary>
        BankCard:4,
    },
    
    PayTypeText:{
    	/// <summary>
        /// 余额
        /// </summary>
        Balance:'余额支付',
        /// <summary>
        /// 银行卡
        /// </summary>
        BankCard:'银行卡支付',
    },
    
    GetPayTypeTextByValue:function(value){
    	return this.PayTypeText[getKeyByValue(this.PayType, value)];
    },
    
    PayRecordsStatus:{
    	/// <summary>
        /// 待支付
        /// </summary>
        Pay : 1,

        /// <summary>
        /// 支付中
        /// </summary>
        Paying : 2,

        /// <summary>
        /// 支付完成
        /// </summary>
        Payed : 3,

        /// <summary>
        /// 自动关闭
        /// </summary>
        Close : 4,

        /// <summary>
        /// 支付撤销
        /// </summary>
        Cancel : 5,

        /// <summary>
        /// 支付失败
        /// </summary>
        Failure : 6
    },
    
    PayRecordsStatusText:{
    	/// <summary>
        /// 待支付
        /// </summary>
        Pay : '待支付',

        /// <summary>
        /// 支付中
        /// </summary>
        Paying : '支付中',

        /// <summary>
        /// 支付完成
        /// </summary>
        Payed : '支付完成',

        /// <summary>
        /// 自动关闭
        /// </summary>
        Close : '自动关闭',

        /// <summary>
        /// 支付撤销
        /// </summary>
        Cancel : '支付撤销',

        /// <summary>
        /// 支付失败
        /// </summary>
        Failure : '支付失败'
    },
    
    GetPayRecordsStatusTextByValue:function(value){
    	return this.PayRecordsStatusText[getKeyByValue(this.PayRecordsStatus, value)];
    },
    
    PayRecordsStatusClass:{
    	/// <summary>
        /// 待支付
        /// </summary>
        Pay : 'icon-waitpay',

        /// <summary>
        /// 支付中
        /// </summary>
        Paying : 'icon-waitpay',

        /// <summary>
        /// 支付完成
        /// </summary>
        Payed : 'icon-success1',

        /// <summary>
        /// 自动关闭
        /// </summary>
        Close : 'icon-error',

        /// <summary>
        /// 支付撤销
        /// </summary>
        Cancel : 'icon-error',

        /// <summary>
        /// 支付失败
        /// </summary>
        Failure : 'icon-error'
    },
    
    
    GetPayRecordsStatusClassByValue:function(value){
    	return this.PayRecordsStatusClass[getKeyByValue(this.PayRecordsStatus, value)];
    },
	
	/// <summary>
    /// 还款计划状态
    /// </summary>
    RepaymentPlanStatus : {
        /// <summary>
        /// 临时
        /// </summary>
        Temp:0,
        /// <summary>
        /// 未支付
        /// </summary>
        Unpay:1,
        /// <summary>
        /// 还款中
        /// </summary>
        Runing:2,
        /// <summary>
        /// 还款完成
        /// </summary>
        Runed:3
    },
    
    /// <summary>
    /// 还款计划状态
    /// </summary>
    RepaymentPlanStatusText : {
        /// <summary>
        /// 临时
        /// </summary>
        Temp:'临时',
        /// <summary>
        /// 未支付
        /// </summary>
        Unpay:'未支付',
        /// <summary>
        /// 还款中
        /// </summary>
        Runing:'还款中',
        /// <summary>
        /// 还款完成
        /// </summary>
        Runed:'已完成'
    },
    
    GetRepaymentPlanStatusTextByValue:function(value){
    	return this.RepaymentPlanStatusText[getKeyByValue(this.RepaymentPlanStatus, value)];
    },
    
    RepaymentPlanStatusClass : {
        /// <summary>
        /// 临时
        /// </summary>
        Temp:'status-temp',
        /// <summary>
        /// 未支付
        /// </summary>
        Unpay:'status-unpay',
        /// <summary>
        /// 还款中
        /// </summary>
        Runing:'status-ing',
        /// <summary>
        /// 还款完成
        /// </summary>
        Runed:'status-ed'
    },
        
    GetRepaymentPlanStatusClassByValue:function(value){
    	return this.RepaymentPlanStatusClass[getKeyByValue(this.RepaymentPlanStatus, value)];
    },    
    
    RepaymentPlanItemStatusClass : {
        /// <summary>
        /// 临时
        /// </summary>
        Temp:'',
        /// <summary>
        /// 未支付
        /// </summary>
        Unpay:'icon-waitpay',
        /// <summary>
        /// 还款中
        /// </summary>
        Runing:'icon-repaying',
        /// <summary>
        /// 还款完成
        /// </summary>
        Runed:'icon-success1'
    },
    
    GetRepaymentPlanItemStatusClassByValue:function(value){
    	return this.RepaymentPlanItemStatusClass[getKeyByValue(this.RepaymentPlanStatus, value)];
    },
    
    /// <summary>
    /// 支付交易类型
    /// </summary>
    PayTradeType: {
        /// <summary>
        /// 还款
        /// </summary>
        Repay:0,
        /// <summary>
        /// 充值
        /// </summary>
        Recharge:1,
        /// <summary>
        /// 信用卡取现
        /// </summary>
        Getcash:2,
        /// <summary>
        /// 零钱取现
        /// </summary>
        Withdraw:3
    },
    
    PayTradeTypeText: {
        /// <summary>
        /// 还款
        /// </summary>
        Repay:'信用卡还款计划',
        /// <summary>
        /// 充值
        /// </summary>
        Recharge:'零钱充值',
        /// <summary>
        /// 信用卡取现
        /// </summary>
        Getcash:'信用卡取现',
        /// <summary>
        /// 零钱取现
        /// </summary>
        Withdraw:'零钱取现'
    },
    
    GetPayTradeTypeTextByValue:function(value){
    	return this.PayTradeTypeText[getKeyByValue(this.PayTradeType, value)];
    },
    
    /// <summary>
    /// 提现审核状态
    /// </summary>
    WithdrawStatus: {
        /// <summary>
        /// 待审核
        /// </summary>
        Pending : 1,
        /// <summary>
        /// 审核中
        /// </summary>
        Review : 2,
        /// <summary>
        /// 审核未通过
        /// </summary>
        NotPassed : 3,
        /// <summary>
        /// 已完成
        /// </summary>
        Completed : 4,
        /// <summary>
        /// 已撤消
        /// </summary>
        Revoked : 5,
        /// <summary>
        /// 已提交代付
        /// </summary>
        Submited : 6,
    },
    
    /// <summary>
    /// 提现审核状态
    /// </summary>
    WithdrawStatusText: {
        /// <summary>
        /// 待审核
        /// </summary>
        Pending : '待处理',
        /// <summary>
        /// 审核中
        /// </summary>
        Review : '处理中',
        /// <summary>
        /// 审核未通过
        /// </summary>
        NotPassed : '失败',
        /// <summary>
        /// 已完成
        /// </summary>
        Completed : '已完成',
        /// <summary>
        /// 已撤消
        /// </summary>
        Revoked : '已撤消',
        /// <summary>
        /// 已提交代付
        /// </summary>
        Submited : '转账中',
    },    
    
    GetWithdrawStatusTextByValue:function(value){
    	return this.WithdrawStatusText[getKeyByValue(this.WithdrawStatus, value)];
    },
    
    GetCertifiedStatusText: function(status) {
		var text = "";
		switch(status) {
			case 0:
			case 1:
				text = "认证中";
				break;
			case 2:
				text = '已认证<span class="mui-icon mui-icon-checkmarkempty" style="color: #2AC845;"></span>';
				break;
			case 3:
			case 4:
				text = "认证失败";
				break;
			default:
				text = '未认证<span class="mui-icon mui-icon-closeempty" style="color: #ff3300;"></span>';
				break;
		}
		return text;
	},
}